package org.jeecg.modules.api.controller.music.toplist;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.vo.toplist.TopListDetailVo;
import org.jeecg.modules.music.service.IMusTopListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Api(tags="音乐系统")
@RestController
@RequestMapping("api/mus/")
public class ToplistCenterController {

    @Autowired
    private IMusTopListService musTopListService;

    @ApiOperation("API-榜单外部接口-获取所有榜单 /toplist")
    @RequestMapping(value = "/all/toplist", method = RequestMethod.GET)
    public Result queryToplistAll(){
        List<TopListDetailVo> list1 = musTopListService.queryTopListAll(1);
        List<TopListDetailVo> list2 = musTopListService.queryTopListAll(2);
        Map<String, Object> map = new HashMap<>();
        map.put("list1",list1);
        map.put("list2",list2);
        return Result.ok(map);
    }
}
